

def myhash(b,g,q,p):
    h = pow(g,b%q,p)
    return h
g = 47
q = 257
p = 1543

flag="DASCTF{488caa75b2d7586e96f4c552ded3654}"
flag1=flag[:8]
flag2=flag[9:]


g1=0
for i in flag:
    g1 = g1 + ord(i)
print(g1)

for i in range(1,200):
    g2=g1+i
    h1 = myhash(g2, g, q, p)
    if h1==1403:
        print(i)
        print(chr(i))
        break
print(flag1+"1"+flag2)
# import string
# str_1=string.printable

# G=0
# for i in range(40):
#     G = G + ord(i)
# H = myhash(G, g, q, p)
# print(H)